package com.mapper;

import com.domain.Admin;
import com.mapper.AdminMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {
    @Select("SELECT * FROM admin_user WHERE id =#{id}")
    public Admin findById(Integer id);

    @Insert("INSERT INTO t_admin(admin_name,pwd,phone) values (#{adminName},#{pwd}),#{phone})")
    public int insertUser(Admin user);

    @Select("SELECT * FROM t_admin WHERE admin_name =#{adminName} and pwd =#{pwd}")
    public Admin userLogin(Admin user);
}

